# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: neodarz <neodarz at neodarz dot net>

pkgname=python-flake8-isort
pkgver=6.0.0
pkgrel=2
pkgdesc='Flake8 plugin to validate annotations complexity'
arch=('any')
url='https://github.com/gforcada/flake8-isort'
license=('GPL3')
depends=(
  'python'
  'flake8'
  'python-isort'
  'python-setuptools'
)
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-wheel'
)
checkdepends=('python-pytest' 'python-toml')
_commit='5d55a7e66841f60ac25395957ff3cb02f3b5ac17'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

build() {
  cd "$pkgname"

  
  python -m build --wheel --no-isolation
}

check() {
  cd "$pkgname"

  pytest run_tests.py
}

package() {
  cd "$pkgname"

  python -m installer --destdir="$pkgdir" dist/*.whl
}
